//
//  HPSignInRequest.m
//  HappyPenguin
//
//  Created by zhuangyihang on 1/31/16.
//  Copyright © 2016 zhuangyihang. All rights reserved.
//

#import "HPSignInRequest.h"
#import <JSONKit-NoWarning/JSONKit.h>

@implementation HPSignInRequest

- (NSDictionary *)prepareForParameter{
    NSDictionary *dic = @{@"USERCODE":self.usercode,@"PASSWORD":self.password};
    
    NSDictionary *machine = @{
                              @"C_MACHINESDK":@"",
                              @"C_MACHINEVERSION":@"",
                              @"C_MACHINESIM":@"",
                              @"C_MACHINEMODEL":@"",
                              @"C_MACHINEIMEI":@"",
                              @"C_MACHINEIESI":@"",
                              @"C_VERSIONNAME":@"",
                              };
    
    return @{@"info":[dic JSONString],@"machine":[machine JSONString]};
}
- (NSString *)getAppType{
    return @"Login";
}

- (HttpBaseResponse *)getResponse:(id)data{
    HPSignInResponse *response = [[HPSignInResponse alloc]init];
    NSArray *a = (NSArray *)data;
    if (a.count>0) {
        NSDictionary *dic = data[0];
        response.user = [[ObjectBuilder builder] objectFromJSON:dic className:@"UserObject"];
    }
    return response;
}

@end

@implementation HPSignInResponse


@end
